﻿package	com.jalheart.utils{
	import	flash.display.MovieClip;
	import	flash.events.*;
	import	flash.text.*;
	public	class	CronometroVisual	extends	MovieClip{
		private	var	miCronometro	:	Cronometro	=	new	Cronometro(Cronometro.PROGRESIVO,-1,1);
		public	function	CronometroVisual()
		{
			miCronometro.addEventListener("intermedio",alIntermedio);
		}
		private	function	alIntermedio(e:Event):void
		{
			var	segs	:	uint	=	miCronometro.elTiempo%60;
			var	mins	:	uint	=	(miCronometro.elTiempo-segs)/60;
			salida.text=String(mins)+":";
			salida.appendText(segs<10?"0"+String(segs):String(segs));
		}
		public	function	get controlador():Cronometro
		{
			return	miCronometro;
		}
	}
}